<?php

namespace app\im\controller;

use app\im\service\UserService;

class User extends Controller
{
    protected $service;

    public function init()
    {
        $this->service = new UserService();
    }

    /**
     * 用户资料
     *
     * @return void
     */
    public function profile()
    {
        $user = $this->service->profile(get_curr_user_id());
        return resp_success($user);
    }

    public function friends()
    {
        $friends = $this->service->friends(get_curr_user_id());
        return resp_success($friends);
    }
}
